﻿using GameStore2.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PagedList;
namespace GameStore2.Controllers
{
    public class SearchController : Controller
    {
        //
        // GET: /Search/
        DBContext db = new DBContext();
        public ActionResult Index(string search, int? page)
        {
            var model = db.Games
                           .Include("Company")
                           .Where(a => a.Name.Contains(search));

            return View(model);
        }

    }
}
